package o;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

public class bmm {
    public static String getSystemProperty(@NonNull String str) {
        try {
            return (String) Class.forName("android.os.SystemProperties").getMethod("get", new Class[]{String.class}).invoke(null, new Object[]{str});
        } catch (Throwable e) {
            bmg.ˊ.ˋ("SystemPropertiesEx", "ClassNotFoundException while getting system property: ", e);
            return "";
        } catch (Throwable e2) {
            bmg.ˊ.ˋ("SystemPropertiesEx", "Exception while getting system property: ", e2);
            return "";
        }
    }

    public static String getSystemProperty(@NonNull String str, @Nullable String str2) {
        try {
            return (String) Class.forName("android.os.SystemProperties").getMethod("get", new Class[]{String.class, String.class}).invoke(null, new Object[]{str, str2});
        } catch (Throwable e) {
            bmg.ˊ.ˋ("SystemPropertiesEx", "ClassNotFoundException while getting system property: ", e);
            return "";
        } catch (Throwable e2) {
            bmg.ˊ.ˋ("SystemPropertiesEx", "Exception while getting system property: ", e2);
            return str2;
        }
    }

    public static int getSystemProperty(@NonNull String str, int i) {
        try {
            i = ((Integer) Class.forName("android.os.SystemProperties").getMethod("getInt", new Class[]{String.class, Integer.TYPE}).invoke(null, new Object[]{str, Integer.valueOf(i)})).intValue();
        } catch (Throwable e) {
            bmg.ˊ.ˋ("SystemPropertiesEx", "ClassNotFoundException while getting system property: ", e);
        } catch (Throwable e2) {
            bmg.ˊ.ˋ("SystemPropertiesEx", "Exception while getting system property: ", e2);
        }
        return i;
    }

    public static boolean getSystemProperty(@NonNull String str, boolean z) {
        try {
            z = ((Boolean) Class.forName("android.os.SystemProperties").getMethod("getBoolean", new Class[]{String.class, Boolean.TYPE}).invoke(null, new Object[]{str, Boolean.valueOf(z)})).booleanValue();
        } catch (Throwable e) {
            bmg.ˊ.ˋ("SystemPropertiesEx", "ClassNotFoundException while getting system property: ", e);
        } catch (Throwable e2) {
            bmg.ˊ.ˋ("SystemPropertiesEx", "Exception while getting system property: ", e2);
        }
        return z;
    }
}
